﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Text;
using System.Threading.Tasks;

namespace SimpleReactiveObjects
{
    // internal helper class
    internal static class DisposableHelper
    {
        public static void ThrowIfDisposed(this CompositeDisposable disposable)
        {
            if (disposable == null)
            {
                throw new ArgumentNullException("disposable");
            }
            if (disposable.IsDisposed)
            {
                throw new ObjectDisposedException(string.Empty);
            }
        }
    }
}
